
import React, { Component } from 'react'
import Child from './Child'
import MyContext from '@/utils/cxt'
export default class Parent extends Component {
  constructor(){
    super()
    this.state={
      count:200
    }
  }
  render() {
    let pStyle={width:'250px',height:'250px',backgroundColor:'orange',display:'flex',justifyContent:'center',alignItems:'center'}
    return (
      <MyContext.Provider value={this.state.count}>
         <div style={pStyle}>
            <Child></Child>
         </div>
      </MyContext.Provider>
     
    )
  }
}
